package com.ruoyi.ldzlsc.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 材料退库对象 sc_material_return
 *
 * @author ldzl
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ScMaterialReturn extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long materialReturnId;

    /** 退库单编号 */
    private String returnCode;

    /** 工单ID */
    private Long workOrderId;

    /** 任务ID */
    private Long workOrderTaskId;

    /** 退库日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date returnDate;

    /** 仓库ID */
    private Long warehouseId;

    /** 退库状态 (0=待审核 1=已审核 2=已完成) */
    private String status;

    /** 逻辑删除标记 (0=未删除 1=已删除) */
    private String isDelete;

    public ScMaterialReturn() {
    }

    public ScMaterialReturn(String returnCode, Long workOrderId, Long workOrderTaskId, 
                           Date returnDate, Long warehouseId, String status, String remark) {
        this.returnCode = returnCode;
        this.workOrderId = workOrderId;
        this.workOrderTaskId = workOrderTaskId;
        this.returnDate = returnDate;
        this.warehouseId = warehouseId;
        this.status = status;
        this.setRemark(remark);
        this.isDelete = "0";
    }
}
